﻿using System.Collections.Generic;
using System.Linq;
using DevFramework.Core.Aspects.CacheAspects;
using DevFramework.Business.Abstract;
using DevFramework.DataLayer.Abstract;
using DevFramework.Entities.Concrete;
using DevFramework.Business.Abstract;

namespace DevFramework.Business.Concrete.Managers
{
    public class LanguageManager:ILanguageService
    {
        private readonly ILanguageDal _languageDal;

        public LanguageManager(ILanguageDal languageDal)
        {
            _languageDal = languageDal;
        }

   
        public List<Language> GetAll()
        {
            return _languageDal.GetList();
        }

   
        public Language Get(string kod)
        {
            return GetAll().SingleOrDefault(t => t.Code == kod);
        }
    }
}
